<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-1.8.3.min.js"></script>
</head>
<body>
部门名称
<hr>
<div id="depNames"></div>
</body>
</html>
<script>
    //初始化页面数据的请求
    $.ajax({
        url:"dep/all",
        type:"get",
        dataType:"json",
        success:function (response) {
            if(response.httpCode == 200){
                var list = response.data;
                for(var i = 0; i < list.length; i++){
                    $("#depNames").append("<a href='depInfo.html?depId="+list[i].depId+"'>"+list[i].depName+"</a><br>")
                }
            }
        }
    })
</script>

